{include file="header.html"}
<script type="text/javascript">
    $(function () {
        $('#add_time_from').datepicker({dateFormat: 'yy-mm-dd'});
        $('#add_time_to').datepicker({dateFormat: 'yy-mm-dd'});
    });
</script>

<div id="rightTop">
    <ul class="subnav" style="margin:0;">
        <li><span>{$lang.account_check}</span></li>
        
    </ul>
</div>

<div class="mrightTop">
    <div class="fontl">
        <form method="get">
            <div class="left">
                <input name="app" type="hidden" id="app" value="account_check" />
                <input name="act" type="hidden" id="act" value="index" />
                用户名:
                <input class="queryInput" type="text" name="user_name" value="{$query.user_name|escape}" />
                时间从:<input class="queryInput pick_date" type="text" value="{$query.add_time_from}" id="add_time_from" name="add_time_from" />
                到:<input class="queryInput pick_date" type="text" value="{$query.add_time_to}" id="add_time_to" name="add_time_to" />
                状态:<select name='wrong'>
                    <option value="-1" {if $smarty.get.wrong=='-1'}selected{/if}>{$lang.select_pls}</option>
                    <option value="0" {if $smarty.get.wrong=='0'}selected{/if}>正确</option>
                    <option value="1" {if $smarty.get.wrong=='1'}selected{/if}>错误</option>
                    <option value="2" {if $smarty.get.wrong=='2'}selected{/if}>已修正</option>
                </select>
                <input type="submit" class="formbtn" value="{$lang.query}" />
            </div>
            <!--{if $filtered}-->
            <a class="left formbtn1" href="index.php?app=account_check">{$lang.cancel_query}</a>
            <!--{/if}-->
            <a class="left formbtn1" href="javascript:drop_confirm('生成时间会比较长，确认要批量生成账单吗？','index.php?app=account_check&act=gen')">批量生成</a>
        </form>
    </div>
    <div class="fontr">
        {include file=page.top.html}
    </div>
</div>

<div class="tdare">
<div style="padding:10px">
1.当距上次检查时已完成收入+距上次检查时未完成收入+上次检查时的可用余额+上次检查时的冻结余额=现可用余额+现冻结余额+距上次检查时已完成支出+距上次检查时未完成支出 时结果正确<br>
2.未完成收入为日志类型为出售商品的未完成预存款记录<br>
3.未完成支出为日志类型为购买商品的未完成预存款记录<br>
4.只有修正错误结果后才能生成下一次账单<br>
5.每次账单最短间隔为1天<br>
</div>
    <table width="100%" cellspacing="0">

        <tr class="tatr1">
            <td>用户名</td>
            <td>已完成收入</td>
            <td>未完成收入</td>
            <td>上次可用余额</td>
            <td>上次冻结余额</td>
            <td>已完成支出</td>
            <td>未完成支出</td>
            <td>现可用余额</td>
            <td>现冻结余额</td>
			<td>结果正确</td>
            <td>计算时间</td>
            <td>操作</td>
        </tr>

        <!--{foreach from=$account_check_list item=account_check key=key}-->
        <tr class="tatr2">
            <td><b>{$account_check.user_name}</b></td>
            <td><font color='blue'>{$account_check.income}</font></td>
            <td><font color='blue'>{$account_check.income_temp}</font></td>
            <td><font color='blue'>{$account_check.begin_money|default:0}</font></td>
            <td><font color='blue'>{$account_check.begin_money_dj|default:0}</font></td>
            <td><font color='red'>{$account_check.outlay}</font></td>
            <td><font color='red'>{$account_check.outlay_temp}</font></td>
			<td><font color='red'>{$account_check.money}</font></td>
			<td><font color='red'>{$account_check.money_dj}</font></td>
			<td>{if $account_check.wrong=='1'}<font color='orange'>否</font>{elseif $account_check.wrong=='2'}<font color='gray'>已修正</font>{else}<font color='green'>是</font>{/if}</td>
            <td>{$account_check.add_time|date:y-m-d H:i:s}</td>
            <td>{if $account_check.wrong=='1'}
            <a href="{url app=account_check&id=$account_check.id&act=edit}">修正</a>&nbsp;|&nbsp;
            {/if}
            {if $account_check.wrong=='2'}
            <a href="{url app=account_check&id=$account_check.id&act=fix}">记录</a>&nbsp;|&nbsp;
            {/if}
            <a href="{url app=account_log&user_id=$account_check.user_id&check_id=$account_check.id}">检查</a></td>
        </tr>
        <!--{foreachelse}-->
        <tr class="no_data">
            <td colspan="8">{$lang.no_data}</td>
        </tr>
        <!--{/foreach}-->
    </table>
    <!--{if $account_check_list}-->
    <div id="dataFuncs">
        <div class="pageLinks">{include file=page.bottom.html}</div>
        <div class="clear"></div>
    </div>
    <!--{/if}-->
</div>
{include file="footer.html"}